package com.keon.jianbao.ui.viewpagerfragment;

import android.view.Menu;
import android.view.MenuInflater;
import android.view.View;

import com.keon.jianbao.R;
import com.keon.jianbao.adapter.ViewPagerFragmentAdapter;
import com.keon.jianbao.api.ApiHttpClient;
import com.keon.jianbao.base.BaseActivity;
import com.keon.jianbao.base.BaseViewPagerFragment;
import com.keon.jianbao.ui.fragment.TweetListFragment;

/**
 * Created by keon on 2015/9/6.
 */
public class TweetViewPagerFragment extends BaseViewPagerFragment {
    @Override
    protected void onSetupTabAdapter(ViewPagerFragmentAdapter adapter) {

    }

    @Override
    protected void onSetupTabAdapter(ViewPagerFragmentAdapter adapter, String reponseData) {

        String[] tabs = getResources().getStringArray(R.array.tweet_tab);
        for (int i = 0; i < tabs.length; i++) {
            adapter.addTab(tabs[i], "", TweetListFragment.class, getBundle(i));
        }
    }

    @Override
    public void initView(View view) {
        setHasOptionsMenu(true);
    }

    @Override
    public void initData() {
        ApiHttpClient.g("http://www.baidu.com", mHandler);
    }

    @Override
    public void onClick(View view) {
        int id = view.getId();

    }

    @Override
    public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
        inflater.inflate(R.menu.menu_main_activity, menu);
        super.onCreateOptionsMenu(menu, inflater);
    }
}
